package com.kaibai.dao;

import com.kaibai.pojo.User;

import java.sql.Connection;
import java.util.List;

public interface UserDao{
    int insert(Connection conn, User user);

    int deleteById(Connection conn,int id);

    int update(Connection conn,User user);

    User getUserById(Connection conn,int id);

    List<User> getAll(Connection conn);

    User login(Connection conn,String name,String password);

    User existsUsername(Connection conn,String name);

    User getUserByName(Connection conn, String name);

    Integer getForPageTotalCount(Connection conn);

    List<User> getForPageItems(Connection conn, int begin, int pageSize);
}
